<template>
	<view class="content pc-tou-gao " >
		<view class="scroll-fix" >
			<view class="d-kuan-juzhong ">
				<!--头部-->
				<view class="d-kuan pc-dingbu ">
					<DToubu 
					@login-success="handleLoginSuccess" 
					:dengluxianshi="denglu_xianshi"
					@update-dengluxianshi="handleUpdateDengluxianshi"
					@www-data="wwwdataget"
					@leixing="leixing_id"
					@denglu-fabu="denglu_fabu"
					:search="search"
					@sousuo="handleSousuo"
					></DToubu>
				</view>
				<!--头部-->
				<!--下面内容-->
				<view class="d-kuan d-clear">
					<uv-row customStyle="margin-bottom: 10px" :gutter="10" >
						<!-- #ifdef H5 -->
						<uv-col span="2" class="pc-yincang">
							<!--左边导航-->
							<view class="d-daohang d-you-10 pc-yincang d-y-gundong d-shang-20" id="zuo-daohang" :style="{height: leftNavHeight}">
								<view class="d-daohang-5 " >
									<Ddaohang @denglu-fabu="denglu_fabu" @leixing="leixing_id"></Ddaohang>
								</view>
							</view>
						</uv-col>
						<!-- #endif -->

						<uv-col :span="kuan_shu" class="kuan_zhongjian">
							<view class="pc-neikuang-20" >
								<!--小程序高度-->
								<!--#ifdef MP-WEIXIN-->
								    <view class="d-kuan d-gao-70">
									</view>
								<!--#endif-->
                                <!--记录10个搜索关键词的历史-->
								<view v-if="historySearches.length > 0" class="d-waigao-20 d-beijing-baise d-yuanjiao-10 d-bianhua-10">
									<view class="d-kuan" style="display: flex; justify-content: space-between; align-items: center; padding: 10px;">
										<text style="font-size: 16px; color: #666;">搜索历史</text>
										<text @click="clearHistory" style="font-size: 14px; color: #999;">清空</text>
									</view>
									<view class="d-kuan" style="display: flex; flex-wrap: wrap; padding: 0 10px 10px;">
										<view v-for="(item, index) in historySearches" :key="index" 
											@click="searchByHistory(item)"
											style="background-color: #f5f5f5; padding: 6px 12px; border-radius: 15px; margin: 5px; font-size: 14px; color: #666;">
											{{item}}
										</view>
									</view>
								</view>



								<view v-if="wwwData && wwwData.setting && wwwData.setting.quan_shuxing != 1"  class="d-waigao-20 d-beijing-baise d-yuanjiao-10 d-bianhua-10">
									
									<view class="d-kuan" style="display: flex; justify-content: space-around;">
										<uv-tabs :list="list_shuxing" lineColor="#02c7b6" @click="click_suxing" :itemStyle="{ height: '44px',color:'#2daf99',fontSize: '20px'}"></uv-tabs>
										
									</view>
								
								</view>


								<view class="d-clear"></view>
								<!--内容-->
									<uv-row customStyle="flex-wrap: wrap" :gutter="20" wrap >
										<uv-col v-for="(tie,index) in tiezi_list" span="12" :key="index">
											<view class="d-waigao-20 d-beijing-baise d-yuanjiao-10 d-bianhua-10 d-tuijian-0" style="position: relative;">
												<!--推荐-->
												<view v-if="tie.tuijian == 1 || tie.quanzhantuijian ==1 " class="d-tuijian-1" style="position: absolute; top: 10px; right: 10px; z-index: 1;">
													<image src="/static/images/tui.png" mode="aspectFill" class="d-img-50"></image>
												</view>
												<!--头像-->
												<view v-if="tie.quan_touxiang==1" class="d-kuan " >
													<view class="d-baifen-50 d-zuo d-buhuanhang">
														<view class="d-gaokuang-40 d-kuanggao-40 d-yuanjiao-40 d-box" @click="go_quan(tie.quan_id)">
														    <image v-if="tie.quan_tubiao" :src="tie.quan_tubiao" mode="aspectFill" class="d-img-40 d-yuanjiao-50  d-img-anhei"></image>
															<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-40 d-yuanjiao-50  d-img-anhei"></image>
														</view>
														<view class="d-kuan d-zuo-10" @click="go_quan(tie.quan_id)">
															<view class="d-wenzi-14 d-jiacu d-wenzi-hei">{{ tie.quan_ming }} </view>
															<view class="d-wenzi-14 d-wenzi-yanse-hui d-chaochu-1">{{ tie.fabushijian }}</view>
														</view>
													</view>
													<view class="d-baifen-50 d-you">
														<view class=" d-neirong-you d-you" >
															<!--view v-if="denglu_xianshi == 1" @click="getGuanzhus(index,item.uid)" class="d-you d-kuan-40 d-beijing-hei d-wenzi-yanse-bai-0 d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >已关注</view>
															<view v-else @click="getGuanzhus(index,item.uid)" class="d-kuan-40 d-beijing-hui-f6 d-wenzi-hei d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >关 注</view-->
														</view>
													</view>
												</view>
												<view v-else class="d-kuan">
													<view class="d-baifen-50 d-zuo d-buhuanhang">
														<view class="d-gaokuang-40 d-kuanggao-40 d-yuanjiao-40 d-box" @click="getgeren(tie.uid)">
														    <image v-if="tie.touxiang" :src="tie.touxiang" mode="aspectFill" class="d-img-40 d-yuanjiao-50  d-img-anhei"></image>
															<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-40 d-yuanjiao-50  d-img-anhei"></image>
														</view>
														<view class="d-kuan d-zuo-10" @click="getgeren(tie.uid)">
															<view class="d-wenzi-14 d-jiacu d-wenzi-hei">{{ tie.mingcheng }} </view>
															<view class="d-wenzi-14 d-wenzi-yanse-hui d-chaochu-1">{{ tie.fabushijian }}</view>
														</view>
													</view>
													<view class="d-baifen-50 d-you">
														<view class=" d-neirong-you d-you" >
															<!--view v-if="denglu_xianshi == 1" @click="getGuanzhus(index,item.uid)" class="d-you d-kuan-40 d-beijing-hei d-wenzi-yanse-bai-0 d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >已关注</view>
															<view v-else @click="getGuanzhus(index,item.uid)" class="d-kuan-40 d-beijing-hui-f6 d-wenzi-hei d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >关 注</view-->
														</view>
													</view>
												</view>
												<view class="d-clear"></view>
												<!--内容-->
												<view class="d-zuoyou-neikuang-10 ">
													<!--标题-->
													<view 
														class="d-jiacu d-shang-10 d-wenzi-16 d-xia-10 d-younei-10  d-wenzi-hei d-jiacu" 
														@click="tiezi(tie.cid,tie.id)"
													>{{ tie.title }}</view>
													<!--进度-->
													<view v-if="tie.jindu && tie.jindu.jindu == 1" class="d-kuan" @click="tiezi(tie.cid,tie.id)">
														<uv-steps :current="tie.jindu && tie.jindu.zhuangtai" class="d-shang-20">
															<uv-steps-item title="已准备" customStyle="font-size: 12rpx;" :desc="tie.jindu && tie.jindu.tianjiashijian"></uv-steps-item>
															<uv-steps-item title="进行中" :desc="tie.jindu && tie.jindu.kaishishijian"></uv-steps-item>
															<uv-steps-item title="已完成" :desc="tie.jindu && tie.jindu.jieshushijian"></uv-steps-item>
														</uv-steps>
													</view>
													<!--内容-->
													<view 
													    class="d-wenzi-12 d-wenzi-yanse-hui d-shang-10 d-xia-10 d-younei-10  d-chaochu-3"
													    @click="tiezi(tie.cid,tie.id)"
													>
														{{ tie.jianjie }}
													</view>
													<!--图片-->
													<view class="d-fu-kuan-10 d-buhuanhang" @click="tiezi(tie.cid,tie.id)">
														<block v-for="(itemtu, indextu) in tie.tupian" :key="indextu">
																<view class="d-kuan-30 d-zuo d-liangbian-10" v-if="indextu < 3">
																	<image :src="itemtu" mode="aspectFill" class="d-img-100-bai d-yuanjiao-6 d-yinying-10 d-img-anhei"></image>
																</view>
														</block>
														<view class="d-clear"></view>
													</view>
													<view class="d-clear"></view>
												<!--音频-->
												<NlAudioPlayer
												    :id="'yinpin_'+index"
												    v-if="tie.yinpin && tie.yinpin[0]"
													:src="tie.yinpin && tie.yinpin[0]"
													style="margin: 20px 0;"
													:bar-bg-style="{ borderRadius: '50px' }"
													:bar-style="{ backgroundColor: '#27a393', borderRadius: '50px' }"
													:dot-style="{ width: '30rpx', height: '30rpx', backgroundColor: '#2ebdac' }"
													:ref="el => this.setAudioRef(el, index)"
													@play="onAudioPlay(index)"
												></NlAudioPlayer>
													<!--视频-->
													<view v-if="tie.shipin_kaiguan == 1 && tie.shipin && tie.shipin[0] && tie.shipin[0].shipin" class="d-shang-10">
														<video 
															class="d-yuanjiao-10 d-kuan d-video-height"
															:src="tie.shipin && tie.shipin[0] && tie.shipin[0].shipin"
															:poster="tie.shipin && tie.shipin[0] && tie.shipin[0].shipintu" 	
															controls
														ref="videoPlayer">
														</video>
													</view>
													<view class="d-clear"></view>
													<!--评论-->
													<view class="d-kuan d-shang-10">

														<view class="">
															<uv-row customStyle="flex-wrap: wrap" :gutter="20" wrap>
																<uv-col span="3" >
																	<view v-if="tie.quan_touxiang==1" class="d-biaoqian" @click="getgeren(tie.uid)">
																		<image v-if="tie.touxiang" :src="tie.touxiang" mode="aspectFill"  class="d-img-20 d-yuanjiao-50  d-img-anhei"></image>
																		<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-20 d-yuanjiao-50  d-img-anhei"></image>
																		<view class="d-chaochu-1 d-zuo-5 " style="color: #909090;">{{tie.mingcheng}}</view>
																		
																	</view>
																	<view v-else class="d-biaoqian" @click="go_quan(tie.quan_id)">
																		
																		<uv-tags 
																		@click="go_quan(tie.quan_id)"
																		:text="tie.quanzi.slice(0, 2)" 
																		size="mini"
																		type="success" 
																		shape="circle" 
																		icon="tags-fill" 
																		plain 
																		plainFill
																		bgColor="#ffffff"
																		borderColor="#02c7b6"
																		color="#02c7b6"
																		iconColor="#02c7b6"
																		></uv-tags>
																	</view>

																</uv-col>
																<uv-col span="6"   @click="tiezi(tie.cid,tie.id)">
																	<uv-row customStyle="flex-wrap: wrap" :gutter="20" wrap>
																		
																		<uv-col span="4">
																			<uv-icon name="heart" color="#bbbbbb" size="18" :label="tie.shoucang" labelColor="#bbbbbb"></uv-icon>
																		</uv-col>
																		<uv-col span="4">
																		    <uv-icon name="chat" color="#bbbbbb" size="18" :label="tie.pinglun" labelColor="#bbbbbb"></uv-icon>
																		</uv-col>
																		<uv-col span="4" >
																			<uv-icon name="thumb-up" color="#bbbbbb" size="18" :label="tie.dianzan" labelColor="#bbbbbb"></uv-icon>
																		</uv-col>
																	</uv-row>

																</uv-col>
																<uv-col span="3" customStyle="display: flex; justify-content: flex-end; " @click="tiezi(tie.cid,tie.id)">
																	<view class="d-kuan" style="display: flex; justify-content: flex-end; ">
																		<uv-avatar-group :urls="tie.dianzan_touxiang" size="22" gap="0.4"></uv-avatar-group>
																	</view>
																</uv-col>
															</uv-row>
														</view>
													</view>
												</view>
											</view>

										</uv-col>
										<!-- 加载状态提示 -->
										<view class="d-kuan d-juzhong d-shangxia-20" v-if="isLoading">
											<uv-loading-icon></uv-loading-icon>
  										</view>
  										<view class="d-kuan d-juzhong d-shangxia-20 d-wenzi-hui" v-if="noMoreData">
  										    <uv-divider text="没有更多数据了"></uv-divider>
											  <uv-gap height="100" bgColor="#bbb"></uv-gap>
  										</view>
									</uv-row>
							    </view>
						</uv-col>
						<!-- #ifdef H5 -->
						<uv-col span="3" class="pc-yincang">
							<view class="d-daohang d-you-10 pc-yincang d-shang-20" id="zuo-daohang" :style="{height: leftNavHeight}">
								<view class="d-you-kuang">
									<view class="d-kuan  " id="yuedu_gao" :style="{height: leftNavHeight,width: rightColWidth,marginTop: '10px'}">
										<view class=" gundong-2"  style="height: 100%; display: flex; flex-direction: column;overflow-y: auto;">
											<view class="d-yuanjiao-10  d-beijing-e3 d-bianhua-10 ">
												<view class="d-kuan">
													<view class="d-jiacu d-wenzi-16 d-zuo">热门圈子</view>
													<view class="d-wenzi-14 d-you" @click="quanzi_url">全部</view>
													<view class="d-clear"></view>
												</view>
												
												<view v-for="(list,index) in list_remen_data" :key="index" @click="go_quan(list.id)" class=" d-wenzi-16 d-quxian-0 d-chaochu d-shangxia-5">
													<view class=" d-buhuanhang">
														<view v-if="(index+1) <= 3" class="d-zuo d-piaofu-0" style="display: flex; justify-content: center; align-items: center;">
															<image :src="'/static/images/top_'+(index+1)+'.png'"  style="width: 36rpx; height: 48rpx; margin-right: 10px;"></image>
														</view>
														<view v-else class="d-zuo d-piaofu-0" style="display: flex; justify-content: center; align-items: center;">
															<view style="width: 36rpx; height: 36rpx;margin-right: 10px; background-color: #d4d4d4;border-radius: 50px;color: #909090; display: flex; justify-content: center; align-items: center;font-size: 12px;" >{{index+1}}</view>
														</view>

														<view class="d-zuo d-piaofu-0" style="display: flex; justify-content: center; align-items: center;">
															<uv-image :src="list.thumb" width="80rpx" height="80rpx" radius="50"></uv-image>
														</view>
														<view class="d-kuan d-neikuang-10 d-piaofu-jiage-0">
														
															<view class="d-chaochu-1 d-jiacu">{{list.title}}</view>

														
															<view class=" d-ziti-12 d-wenzi-yanse-hui d-shangxia-5 d-buhuanhang">

																<view class="d-chaochu-1 ">帖子：{{list.quantie_total}}</view>
															</view>
														</view>
													</view>
													<uv-line color="#d9d9d9"></uv-line>
													
												</view>

											</view>
											<!--推荐圈子-->
											<view class="d-yuanjiao-10 d-waigao-20 d-beijing-e3 d-bianhua-10 ">
												<view class="d-kuan d-jiacu d-wenzi-16">
													推荐圈子
												</view>
												<uv-row customStyle="margin-bottom: 10px">
													<!--uv-col span="3" customStyle="display: flex; flex-direction: column; align-items: center;margin-top: 10px">
														<uv-avatar src="/static/img/011.jpg" shape="square"></uv-avatar>
														<view class="demo-layout bg-purple">321</view>
													</uv-col>
													<uv-col span="3" customStyle="display: flex; flex-direction: column; align-items: center;margin-top: 10px">
														<uv-avatar src="/static/img/011.jpg" shape="square"></uv-avatar>
														<view class="demo-layout bg-purple">321</view>
													</uv-col>
													<uv-col span="3" customStyle="display: flex; flex-direction: column; align-items: center;margin-top: 10px">
														<uv-avatar src="/static/img/011.jpg" shape="square"></uv-avatar>
														<view class="demo-layout bg-purple">321</view>
													</uv-col>
													<uv-col span="3" customStyle="display: flex; flex-direction: column; align-items: center;margin-top: 10px">
														<uv-avatar src="/static/img/011.jpg" shape="square"></uv-avatar>
														<view class="demo-layout bg-purple">321</view>
													</uv-col-->


												</uv-row>


											</view>
											<!--推荐课程-->
											<view class="d-yuanjiao-10 d-waigao-20 d-beijing-e3 d-bianhua-10 ">
												<view class="d-kuan d-jiacu d-wenzi-16">
													微信访问
												</view>
												<view class="d-kuan d-buhuanhang d-shang-20">
													<view style="width: 100px;" class="  d-neikuang-10 d-beijing-bai d-yuanjiao-10">
														<uv-qrcode ref="qrcode" size="80px" :value="config.getDomain"></uv-qrcode>
													</view>
													<view class="d-kuan">
														<view class="d-jiacu d-zuo-10">
															{{wwwData && wwwData.setting && wwwData.setting.config.SITE_NAME}}
														</view>
														<view class="d-zuo-10 d-wenzi-12 d-shang-5">
															{{ wwwData && wwwData.setting && wwwData.setting.config.SITE_JIANJIE }}
														</view>

													</view>

												</view>


											</view>
											<view class="d-yuanjiao-10 d-shang-20 d-wenzi-12" style="color: #909090;" >
												<view>
													公司名称：{{wwwData && wwwData.setting && wwwData.setting.config.GONGSI_MINGCHENG}}
												</view>
												<view class="d-shang-5">
													公司地址：{{wwwData && wwwData.setting && wwwData.setting.config.GONGSI_DIZHI}}
												</view>
												<view class="d-shang-5">
													联系方式：{{wwwData && wwwData.setting && wwwData.setting.config.GONGSI_KEFU}}
												</view>
											</view>
											<view class="d-yuanjiao-10 d-shang-20 d-wenzi-10 d-xia-10" style="color: #dedede;margin-top: 100px;" >
												<a href="https://www.duixin.cc" target="_blank" class="d-link" style="color: #dedede;" >
													Powered by 对信 {{ config.getDuixinbanbenhao }}
												</a>
											</view>
											<!--底部-->
											<!--view class="d-kuan d-waigao-20 d-bianhua-10 ">
												
											</view-->																		
										</view>																								
									</view>
								</view>
							</view>
						</uv-col>
						<!-- #endif -->
					</uv-row>					
				</view>
				<!--下面内容-->
			</view>
			<view class="d-clear"></view>
		</view>
		<!--底部-->
		<view class="d-kuan d-waigao-20 d-bianhua-10 pc-yincang"></view>

		<view class="d-clear pc-yincang"></view>
		<view class="d-weibu pc-yincang">
			<Dweibu></Dweibu>
		</view>

	</view>
</template>

<script>
    import Api from '@/utils/api.js'; 
	import config from '@/utils/config.js'; 
	import QuanApi from '@/utils/quan_api.js';
	import YingyongApi from '@/utils/yingyong_api.js';
	import { getRequest,postRequest } from '@/utils/wxRequest.js';
    //引入组件 d-toubu
    import DToubu from '@/components/d-toubu/d-toubu.vue'
	import Ddaohang from '@/components/d-daohang/d-daohang.vue'
	import Dweibu from '@/components/d-weibu/d-weibu.vue'
	import NlAudioPlayer from '@/uni_modules/nl-audio-player/components/nl-audio-player/nl-audio-player.vue'
    import Dtuijian from '@/components/d-tuijian/d-tuijian.vue'
	export default {
		data() {
			return {
				title: 'Hello',
				leftNavHeight: '500rpx', // 默认高度
				audioPlayers: {}, // 存储所有音频播放器引用
                rightColWidth: '300px', // 默认宽度
                currentPlayingAudio: null, // 当前正在播放的音频索引
                playTimeout: null, // 播放定时器ID
				rightColLeft: '0px', // 添加这个属性
				erjidata:[],
				erjiindex:'',//当前激活的二级菜单索引
				activeIndex: -1, // 当前激活的一级菜单索引
				zhishi_tuijian_data:[], // 知识推荐数据
				zhishi_daohang_list:[], // 知识导航列表
				zhishi_list:[], // 知识列表
				haibao_data:[], // 海报数据
				imageSize: {
        		    width: 0,
        		    height: 0
        		},
				tubiaolist: 
				['integral', 'kefuv-ermai', 'coupon', 'gift', 'scan',
					'pause-circle', 'volume-off', 'email', 'list'
				],
				denglu_xianshi:0, // 登录显示

				tiezi_list:[], // 帖子列表

				currentPage: 1, //下拉加载
    			pageSize: 20, //下拉加载
    			isLoading: false, //下拉加载
    			noMoreData: false, //下拉加载
				kuan_shu: 7, //格大小
				swiperHeight: '250',
				gao: '20', //图片高度
				fuwugaozhi: '100px', // 服务项图片高度
				scrollTimeout: null, // 滚动防抖计时器
				
				shenhe_shu:0,//审核帖子数量
				list_fuwu:[],//服务列表
				list_shuxing:[
					{
						id:0,
						name: '全部',
					},
					{
						id:1,
						name: '图文',
					},
					{
						id:2,
						name: '视频',
					},
					{
						id:3,
						name: '音频',
					},
					{
						id:4,
						name: '附件',
					},
					{
						id:5,
						name: '付费文章',
					},
				],
				list_fenxing:[
					{
						id:1,
						name:'图文',
					}
				],
				list_tubiao:[],
				list_remen_data:[],
				wwwData: {  }, // 新增属性，设置默认domain值
				config: config,
				index_suxing:0,
				kuan_zhongjian_data: 250, // 中间宽度值
				search:'',//搜索内容
				historySearches: [], //搜索历史记录
				//pc:false
			}
		},
		components: {
  		    DToubu,
			Ddaohang,
			Dweibu,
			NlAudioPlayer,
			Dtuijian
  		},
		mounted() {
				//var m = this.$store.state;
				//console.log('mmmm',m);
				
			    this.setLeftNavHeight();
				this.getRightColWidth(); // 添加这行
				this.getFuwuGaoWidth(); // 添加这行，计算服务项图片宽度
				this.getKuanZhongjianWidth(); // 添加这行，获取中间宽度
			    // 添加窗口大小变化监听
				// #ifdef H5
			    window.addEventListener('resize', this.setLeftNavHeight);
				window.addEventListener('resize', this.getRightColWidth); // 添加这行
				window.addEventListener('resize', this.getFuwuGaoWidth); // 添加这行，计算服务项图片宽度
				window.addEventListener('resize', this.getKuanZhongjianWidth); // 添加这行，窗口大小变化时重新计算中间宽度
				// #endif
				// 添加滚动事件监听
				// #ifdef H5
				document.addEventListener('scroll', this.handleScroll);
				document.addEventListener('touchmove', this.handleScroll);
				// #endif
				var e = this;
				//this.onImageLoad(e);
				
				// 从本地存储加载搜索历史
				const history = uni.getStorageSync('searchHistory');
				if (history && Array.isArray(history)) {
					this.historySearches = history;
				}
			},
    	beforeDestroy() {
			        // #ifdef H5
					// 移除监听
					window.removeEventListener('resize', this.setLeftNavHeight);
					window.removeEventListener('resize', this.getRightColWidth); // 添加这行
					window.removeEventListener('resize', this.getFuwuGaoWidth); // 添加这行
					window.removeEventListener('resize', this.getKuanZhongjianWidth); // 添加这行
					// #endif
					
					document.removeEventListener('scroll', this.handleScroll);
					document.removeEventListener('touchmove', this.handleScroll);
					// 清除播放定时器
					if (this.playTimeout) {
						clearTimeout(this.playTimeout);
					}
					// 清除滚动防抖计时器
					if (this.scrollTimeout) {
						clearTimeout(this.scrollTimeout);
						this.scrollTimeout = null;
					}
					// 组件卸载时关闭所有音频
					this.closeAllAudios();
				},    
				onHide() {
					// 页面隐藏时清除leixing_id和activeLei
					uni.removeStorageSync('leixing_id');
					uni.removeStorageSync('activeLei');
					//console.log('页面隐藏，已清除leixing_id和activeLei');
				},
				onUnload() {
					// 页面卸载时清除leixing_id和activeLei
					uni.removeStorageSync('leixing_id');
					uni.removeStorageSync('activeLei');
					//console.log('页面卸载，已清除leixing_id和activeLei');
				},
		onShow() {
			//var m = this.$store.state;
			//console.log('12300000:', this.$store.state.memberuid);
			//
			// 每次显示首页时，更新当前页面状态到本地存储
			uni.setStorageSync('currentPage', 'index/index');
			
			//var e = this;
			
			// this.haibao_api();
			
			//this.getTiezi_api(e,false);
			this.getShenhe_shu_api();
			//this.get_fuwu_api(); // 去除云端接口
			this.get_tubiao_daohang();
			this.get_remen_api(); //热门
			//获取本地存储的leixing_id
			/*var leixing_id = uni.getStorageSync('leixing_id');
			if(leixing_id){
				//如果有leixing_id，那么就设置activeLei为leixing_id
				this.activeLei = leixing_id;
			}*/
			var leixing_id = uni.getStorageSync('leixing_id');
			//console.log('首页的值leixing_id000000',leixing_id);
			var e = leixing_id;
			this.index_suxing = e;
							// 先初始化data对象，避免未定义错误
				let data = {};
				// 如果传入的参数e等于1，则设置tuijian属性为1（推荐标识）
				//推荐
				if (e == 1) {
					data.tuijian = 1;
					
				}
				//精华
				if (e == 2) {
					data.jinghua = 1;
					//console.log('设置data.jinghua = 2');
				}
				//热门
				if(e == 3){
					data.rumen = 1;
				}
				//热评
				if(e == 4){
					data.reping = 1;
				}
				//关注
				if(e == 5){
					data.guanzhu = 1;
				}
				//收藏
				if(e == 7){
					data.shoucang = 1;
				}
				//点赞
				if(e == 8){
					data.dianzan = 1;
				}
				//评论
				if(e == 9){
					data.pinglun = 1;
				}
				//历史
				if(e == 10){
					data.lishi = 1;
				}

			this.getTiezi_api(data,false);
			

			
			
		},
		onLoad(e) {
			// 从 URL 获取搜索参数
			this.search = e.search || '';
			console.log('搜索内容123:', this.search);
			// 自定义导航栏标题
			/*uni.setNavigationBarTitle({
				title: this.config.getWebsiteName,
			});*/
		},
		computed: {
		  yidenglu() {
		    return (this.$store.state.memberuid && this.$store.state.keycode) ? 1 : 0;
		  },
		  uid() {
		    return this.$store.state.memberuid;
		  },
		  touxiang() {
		    return this.$store.state.member? this.$store.state.member.avatar : '';
		  },
		  name1() {
		    return this.$store.state.member? this.$store.state.member.name : '';
		  },
		  // 添加设备类型计算属性
  			pc() {
  			  return this.$store.state.kuan.pc;
  			},
  			pingban() {
  			  return this.$store.state.kuan.pingban;
  			},
  			yidong() {
  			  return this.$store.state.kuan.yidong;
  			},
  			kuan() {
  			  return this.$store.state.kuan.windowWidth;
  			}
		},
		onReachBottom() {
  			this.onReachBottom(); //下拉加载分页
  		},

		methods: {
			// 设置音频引用
			setAudioRef(el, index) {
				if (!this.audioPlayers) {
					this.audioPlayers = {};
				}
				if (el) {
					this.audioPlayers[index] = el;
				}
			},
			//获取页面所有的音频 id=yinpin_ 元素
			getAllAudioElements() {
				try {
					// 检查 document 是否存在（兼容不同环境）
					if (typeof document === 'undefined') {
						//console.warn('当前环境不支持 document 对象');
						return [];
					}
					
					// 使用标准属性选择器获取所有 id 以 'yinpin_' 开头的元素
					const audioElements = document.querySelectorAll('[id^="yinpin_"]');
					const audioArray = Array.from(audioElements);
					//console.log('获取到音频元素数量:', audioArray.length);
					
					// 返回数组格式便于后续操作
					return audioArray;
				} catch (e) {
					console.error('获取音频元素失败:', e);
					return [];
				}
			},
			
			// 处理滚动事件，关闭所有视频和不可见的音频，并实现滚动触底检测
			handleScroll() {
				this.closeAllVideos();
				this.closeAllAudios();
				
				// 滚动触底检测
				if (typeof window !== 'undefined' && typeof document !== 'undefined') {
					const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
					const scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
					const clientHeight = document.documentElement.clientHeight || window.innerHeight;
					
					// 当滚动到距离底部150px时触发加载更多（增加触发距离以提高灵敏度）
					const distanceToBottom = scrollHeight - scrollTop - clientHeight;
					if (distanceToBottom < 150 && !this.isLoading && !this.noMoreData) {
						// 防抖处理，避免短时间内重复触发
						if (!this.scrollTimeout) {
							this.scrollTimeout = setTimeout(() => {
								this.loadMoreData();
								this.scrollTimeout = null;
							}, 100);
						}
					}
				}
			},
			//搜索
			handleSousuo(searchValue) {
				if (searchValue) {
					// 记录搜索历史
					// 检查是否已存在该搜索词
					const index = this.historySearches.indexOf(searchValue);
					if (index > -1) {
						// 如果已存在，移除后添加到最前面
						this.historySearches.splice(index, 1);
					}
					// 添加到最前面
					this.historySearches.unshift(searchValue);
					// 限制最多10条记录
					if (this.historySearches.length > 10) {
						this.historySearches.pop();
					}
					// 保存到本地存储
					uni.setStorageSync('searchHistory', this.historySearches);
				}
				this.search = searchValue;
				this.currentPage = 1;
				this.noMoreData = false;
				let data = {};
				data.search = searchValue;
				this.getTiezi_api(data, false);
			},
			
			// 清理搜索历史
			clearHistory() {
				uni.showModal({
					title: '提示',
					content: '确定要清空搜索历史吗？',
					success: (res) => {
						if (res.confirm) {
							this.historySearches = [];
							uni.removeStorageSync('searchHistory');
						}
					}
				});
			},
			
			// 点击历史记录进行搜索
			searchByHistory(keyword) {
				this.handleSousuo(keyword);
			},
			
			// 加载更多数据
			loadMoreData() {
				this.isLoading = true;
				// 显示加载提示
				/*uni.showToast({
					title: '正在加载下一页...',
					icon: 'none',
					duration: 1500
				});*/
				this.currentPage++;
				
				// 获取当前激活的分类ID
				const currentCategoryId = this.activeIndex.id >= 0 ? this.activeIndex.id : 0;
				
				const data = {
					page: this.currentPage,
					categories: currentCategoryId
				};
				
				// 如果有其他筛选条件，也应该加到data中
				const leixing_id = uni.getStorageSync('leixing_id');
				if (leixing_id == 1) data.tuijian = 1;
				if (leixing_id == 2) data.jinghua = 1;
				if (leixing_id == 3) data.rumen = 1;
				if (leixing_id == 4) data.reping = 1;
				if (leixing_id == 5) data.guanzhu = 1;
				if (leixing_id == 7) data.shoucang = 1;
				
				this.getTiezi_api(data, true);
			},

			// 关闭页面上所有的视频
			closeAllVideos() {
				// 获取所有视频元素
				const videoElements = document.querySelectorAll('video');
				if (videoElements.length > 0) {
					videoElements.forEach(video => {
						if (!video.paused) {
							try {
								video.pause();
							} catch (e) {
								console.log('视频暂停失败:', e);
							}
						}
					});
				}
			},
			
			// 音频开始播放时的处理
			onAudioPlay(currentIndex) {
				console.log('音频开始播放，索引:', currentIndex);
				// 先关闭所有其他音频
				this.closeAllAudios();
				// 短暂延迟后，确保其他音频都已停止
				setTimeout(() => {
					// 然后尝试重新播放当前点击的音频（如果因为closeAllAudios而被暂停）
					if (this.audioPlayers && this.audioPlayers[currentIndex]) {
						try {
							const currentAudio = this.audioPlayers[currentIndex];
							if (typeof currentAudio.play === 'function') {
								currentAudio.play();
							}
						} catch (e) {
							console.log('重新播放当前音频失败:', e);
						}
					}
				}, 100);
			},
			
			// 关闭页面上所有的音频
			closeAllAudios() {
				try {
					// 优先使用audioPlayers中的引用（Vue组件方式）
					if (this.audioPlayers && typeof this.audioPlayers === 'object') {
						Object.keys(this.audioPlayers).forEach(key => {
							const audioPlayer = this.audioPlayers[key];
							if (audioPlayer) {
								// 尝试使用Vue组件方式调用pause方法
								if (typeof audioPlayer.pause === 'function') {
									try {
										audioPlayer.pause();
										//console.log('通过组件引用成功暂停音频');
									} catch (e) {
										//console.log('组件引用暂停失败:', e);
									}
								}
							}
						});
					}
					
					// 回退方案：使用getAllAudioElements获取所有音频元素
					const audioElements = this.getAllAudioElements();
					if (audioElements.length > 0) {
						audioElements.forEach(audioElement => {
							// 尝试多种方式停止音频
							if (audioElement) {
								// 1. 尝试直接调用pause方法
								if (typeof audioElement.pause === 'function') {
									try {
										audioElement.pause();
									} catch (e) {
										console.log('音频直接暂停失败:', e);
									}
								}
								
								// 2. 检查是否有内部的audioContext并关闭
								if (audioElement.audioContext) {
									try {
										audioElement.audioContext.close();
									} catch (e) {
										console.log('关闭audioContext失败:', e);
									}
								}
								
								// 3. 重置音频.currentTime
								if (typeof audioElement.currentTime !== 'undefined') {
									try {
										audioElement.currentTime = 0;
									} catch (e) {
										console.log('重置音频时间失败:', e);
									}
								}
							}
						});
					}
				} catch (e) {
					console.error('关闭音频失败:', e);
				}
			},
			

			//左边导航
			leixing_id(e){
				this.index_suxing = e; // 首页id属性
				//console.log('leixing事件，参数e:', e, '类型:', typeof e);

				// 先初始化data对象，避免未定义错误
				let data = {};
				// 如果传入的参数e等于1，则设置tuijian属性为1（推荐标识）
				//推荐
				if (e == 1) {
					data.tuijian = 1;
					//console.log('设置data.tuijian = 1');
				}
				//精华
				if (e == 2) {
					data.jinghua = 1;
					//console.log('设置data.jinghua = 2');
				}
				//热门
				if(e == 3){
					data.rumen = 1;
				}
				//热评
				if(e == 4){
					data.reping = 1;
				}
				//关注
				if(e == 5){
					data.guanzhu = 1;
				}
				//收藏
				if(e == 7){
					data.shoucang = 1;
				}
				//点赞
				if(e == 8){
					data.dianzan = 1;
				}
				//评论
				if(e == 9){
					data.pinglun = 1;
				}
				//历史
				if(e == 10){
					data.lishi = 1;
				}

				//console.log('准备调用getTiezi_api，data:', data);
				this.getTiezi_api(data, false);
			},
			click_suxing(e){
				
				//this.index_suxing = 0;
				let data = {};
				//全部
				//推荐
				if(e.id == 1){
					data.tupianzhi = 1;
				}
				//视频
				if(e.id == 2){
					data.shipinzhi = 1;
				}
				//音频
				if(e.id == 3){
					data.yinpinzhi = 1;
				}
				//附件
				if(e.id == 4){
					data.fujianzhi = 1;
				}
				//付费文章
				if(e.id == 5){
					data.fufeizhi = 1;
				}
				this.getTiezi_api(data, false);
			},
			//图片
			onImageLoad(e, index) {
				// 获取系统信息
				const systemInfo = uni.getSystemInfoSync();
        	    // 计算可用高度（可根据实际需求调整计算方式）
        	    const windowHeight = systemInfo.windowWidth;
				if(windowHeight >=1221){
					var gao = 30;
					
				} else {
					var gao = 0;
				}


				this.$nextTick(() => {
        		    const query = uni.createSelectorQuery().in(this);
        		    query.select('#tupian-'+index).boundingClientRect(data => {
        		        if (data && data.width > 0 && data.height > 0) {
        		            this.$set(this.haibao_data[index], 'imageSize', {
        		                width: data.width,
        		                height: data.height + gao
        		            });
							//console.log('图片尺寸:', this.haibao_data[index].imageSize);
        		        } else {
        		            //console.warn(`图片${index}尺寸获取失败`);
        		            this.$set(this.haibao_data[index], 'imageSize', {
        		                width: 300,
        		                height: 200
        		            });
        		        }
        		    }).exec();
        		});

    		},
			getRightColWidth() {
				// 获取系统信息
				const systemInfo = uni.getSystemInfoSync();
        	    // 计算可用高度（可根据实际需求调整计算方式）
        	    const windowWidth = systemInfo.windowWidth;
				var d = this;

                this.$nextTick(() => {
				if(windowWidth >=1221){
					d.gao = 20;
					d.kuan_shu = 7;
					d.swiperHeight = '250';
				} else {
					d.gao = 10;
					d.kuan_shu = 12;
					d.swiperHeight = '120';

				}
				//console.log('窗口高度:', windowWidth);

                 const query = uni.createSelectorQuery().in(this);
                 query.select('#youbiankuan').boundingClientRect(rect => {
                   if (rect) {
                     /*this.rightColWidth = `${rect.width+20}px`;
                     console.log('右侧列宽度:', this.rightColWidth);*/
					 	this.rightColWidth = `${rect.width-80}px`;
                    	this.rightColLeft = `${rect.left}px`; // 计算左侧位置
                    	///console.log('右侧列位置:', this.rightColWidth);
                   }
                 }).exec();
               });
            },

			//首页
			shouye(){
				uni.navigateTo({
					url: '/pages/index/index',
					fail: (err) => {
						console.error('跳转失败:', err)
					}
				})
			},
			// ...其他方法保持不变...
			
			setLeftNavHeight() {
        	    // 获取系统信息
        	    const systemInfo = uni.getSystemInfoSync();
        	    // 计算可用高度（可根据实际需求调整计算方式）
        	    const windowHeight = systemInfo.windowHeight;
        	    const headerHeight = 70; // 头部高度估计值
        	    const calculatedHeight = windowHeight - headerHeight;
				 
        	    // 设置左边导航高度
        	    this.leftNavHeight = `${calculatedHeight}px`;
        	},
			// 获取中间宽度
			getKuanZhongjianWidth() {
				var d = this;
                this.$nextTick(() => {
                 const query = uni.createSelectorQuery().in(this);
                 query.select('.kuan_zhongjian').boundingClientRect(rect => {
                   if (rect) {
                     d.kuan_zhongjian_data = rect.width;
                     //console.log('中间宽度:', d.kuan_zhongjian_data);
                   } else {
                     //console.log('未获取到中间宽度，500ms后重试');
                     // 如果未获取到宽度，500ms后重试
                     setTimeout(() => {
                       d.getKuanZhongjianWidth();
                     }, 500);
                   }
                 }).exec();
               });
			},
			zhishi(id){
				console.log(id);
				try {
  				  uni.navigateTo({
  				    url: '/pages/zhishi/index?id='+id,
  				    fail: (err) => {
  				      console.error('跳转失败:', err)
  				    }
  				  })
  				} catch (e) {
  				  console.error('跳转异常:', e)
  				}
			},
			
			handleLoginSuccess() {
  			  this.$forceUpdate();
  			},
			
			
			// 海报接口
			haibao_api(){
				// 获取系统信息
				const systemInfo = uni.getSystemInfoSync();
        	    // 计算可用高度（可根据实际需求调整计算方式）
        	    const windowHeight = systemInfo.windowHeight;
				if(windowHeight >=920){
					var gao = 200;
					
				} else {
					var gao = 120;

				}

				var get_data = getRequest(Api.getHaibao());
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						// 转换时间戳为日期格式
						//var list = res.data ? res.data.data : {};
						/*var list = res.data && res.data.data ? res.data.data : [];
        				this.haibao_data = list;*/
						this.haibao_data = (res.data.data || []).map(item => ({
            			    ...item,
            			    imageSize: { width: 300, height: gao } // 添加默认尺寸
            			}));
						
					} else {
						uni.showToast({
							icon: 'none',
							title: '获取失败，请稍后重试'
						});
					}
				})
			},
			
			denglu_fabu(){
				if(this.yidenglu == 0){
					this.denglu_xianshi = 1;
				} else {
					this.denglu_xianshi = 0;	
				}
				
				//console.log('发布登录',this.denglu_xianshi);
				
			},
			// 更新判断是否登录
			handleUpdateDengluxianshi(value) {
			  this.denglu_xianshi = value;
			  //console.log('关闭登录',this.denglu_xianshi);
			},
			// 帖子列表
			getTiezi_api(data,isLoadMore = false){
				if (!data) data = {};
				if (!data.page) data.page = 1;
				if (!data.categories) data.categories = 0;
				if (!data.search) data.search = this.search;
				// 自定义导航栏标题
				uni.setNavigationBarTitle({
					title: '搜索：'+data.search, 
				});
				var memberUid = this.$store.state.memberuid;
				var keycode = this.$store.state.keycode;
				if(memberUid){
					data.uid = memberUid;
				}
				if(keycode){
					data.keycode = keycode;
				}
				//if (!data.tuijian) data.tuijian = 1; // 推荐
				//if (!data.jinghua) data.jinghua = 1; // 精华
				//console.log('data.tuijian0000',data.tuijian);
				//console.log('data.jinghua1111',data.jinghua);
				data.gongkai = 1;
				//data.syxs = 1;
				
				var get_data = getRequest(Api.getTiezi_list(data));
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						// 转换时间戳为日期格式
						var list = res.data? res.data.data : {};
						// 确保list是数组
						if (!Array.isArray(list)) list = [];
						if (isLoadMore) {
        				  // 加载更多时追加数据
        				  this.tiezi_list = [...this.tiezi_list, ...list];
        				  // 加载更多时，如果返回的数据小于pageSize，则认为没有更多数据
        				  // 但需要考虑第一次加载就不足pageSize的情况
        				  if (this.tiezi_list.length > 0) {
        				    this.noMoreData = list.length < this.pageSize;
        				  }
        				} else {
        				  // 非加载更多时替换数据
        				  this.tiezi_list = list;
        				  // 切换分类时重置noMoreData状态
        				  this.noMoreData = false;
        				}	
						
						// 确保即使第一次加载就没有数据，也能正确设置noMoreData
						if (!isLoadMore && list.length === 0) {
						  this.noMoreData = true;
						}

					} else {
						uni.showToast({
							icon: 'none',
							title: '获取失败，请稍后重试'
						});
					}
					this.isLoading = false;
				}).catch(() => {
    			  this.isLoading = false;
    			  if (isLoadMore) {
    			    this.currentPage--; // 加载失败时回退页码
    			  }
    		    });


			},
			// 下拉加载更多
			onReachBottom() {
  			  if (this.isLoading || this.noMoreData) return;
  			  this.isLoading = true;
  			  this.currentPage++;
			  // 获取当前激活的分类ID
    			const currentCategoryId = this.activeIndex.id >= 0 ? this.activeIndex.id : 0;
    			

  			  const data = {
  			    page: this.currentPage,
  			    categories: currentCategoryId
  			  };
			  //console.log('分页',this.activeIndex.id);
  			  this.getTiezi_api(data, true); // 添加第二个参数表示是加载更多
  			},
			// 帖子
			tiezi(cid,id){
				console.log(id);	
				try {
  				  uni.navigateTo({
  				    url: '/pages/tiezi/index?id='+id+'&cid='+cid,
  				    fail: (err) => {
  				      console.error('跳转失败:', err)
  				    }
  				  })
  				} catch (e) {
  				  console.error('跳转异常:', e)
  				}

			},
			//审核帖子数量
			getShenhe_shu_api(){
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				

				var get_data = getRequest(QuanApi.getShenhe_shu(uid,keycode));
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						
						this.shenhe_shu = res.data.data;
						
					}
				})

			},
			// 审核帖子
			shenhe(){
				uni.navigateTo({
					url: '/pages/shenhe/index',
					fail: (err) => {
					  console.error('跳转失败:', err)
					}
				})
			},
			//个人页面
			getgeren(uid){
				uni.navigateTo({
					url: '/pages/u/index?uid='+uid,
					fail: (err) => {
					  console.error('跳转失败:', err)
					}
				})

			},
			fuwu_gao(id){
			// 跳转
				uni.navigateTo({
					url: '/pages/yingyong/id?id='+id,
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			// 跳转演示
			yanshi(){
				uni.navigateTo({
					url: '/pages/shouce/shouce?id=1&ce=7&yijiid=1',
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			// 跳转演示
			shouce(){
				uni.navigateTo({
					url: '/pages/shouce/shouce?id=1',
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			// 跳转演示
			xiazai(){
				uni.navigateTo({
					url: '/pages/shouce/shouce?id=1&ce=2&yijiid=1',
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			// 跳转演示
			banben(){
				uni.navigateTo({
					url: '/pages/quanzi/index?id=3',
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			// 跳转演示
			wenda(){
				uni.navigateTo({
					url: '/pages/wenda/index',
					fail: (err) => {
					console.error('跳转失败:', err)
					}
				})
			},
			//热门圈子
			get_remen_api(){
				var get_data = getRequest(QuanApi.get_remen_quan());
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						this.list_remen_data = res.data.data && res.data.data.list;
						
					}
				})
			},
			
			// 图标导航
			get_tubiao_daohang(){
				
				var get_data = getRequest(Api.get_daohang());
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						
						this.list_tubiao = res.data.data && res.data.data.list;
						
					}
				})
			},
			// 图标跳转页面
			go_yemian(ymlx,www){
				if(ymlx == 1){
					uni.navigateTo({
						url: www,
						fail: (err) => {
						  console.error('跳转失败:', err)
						}
					})
				}else if(ymlx == 2){
					uni.switchTab({
						url: www,
						fail: (err) => {
						  console.error('跳转失败:', err)
						}
					})
				}
			},
			go_quan(id){
				uni.navigateTo({
					url: '/pages/quanzi/index?id='+id,
					fail: (err) => {
					  console.error('跳转失败:', err)
					}
				})
			},
			//站点设置
			wwwdataget(data){
				this.wwwData = data;
				//console.log('wwwdata',this.wwwdata);
			},
			// 网站数据
			handleWwwData(data) {
				this.wwwData = data;
			},
			//版权链接
			duixin(){
				
			},
			//链接圈子
			quanzi_url(){
				uni.switchTab({
					url: '/pages/quan/index',
					fail: (err) => {
					  console.error('跳转失败:', err)
					}
				})
			},
			get_fuwu_api(){
				var get_data = getRequest(YingyongApi.getYingyong_fuwu());
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {

						this.list_fuwu = res.data.data && res.data.data.list;
						// 打印
						//console.log('fuwu',this.list_fuwu);
						// 数据加载完成后重新计算宽度
						this.$nextTick(() => {
							this.getFuwuGaoWidth();
						});
					}
				})
		    },
		// 计算服务项图片宽度
		getFuwuGaoWidth() {
					this.$nextTick(() => {
						const query = uni.createSelectorQuery().in(this);
						query.select('.fuwu_gao_item').boundingClientRect(rect => {
							if (rect) {
								this.fuwugaozhi = `${rect.width}px`;
								// console.log('服务项宽度:', this.fuwugaozhi);
							} else {
								// 如果获取失败，使用默认值
								this.fuwugaozhi = '100px';
							}
						}).exec();
					});
				},

		},
		
		
		
		
	}
</script>

<style >
	.content {
		
		
		display: flex;
		flex-direction: column;
		/*align-items: center;*/
		
		background-color: #f3f3f3;
		padding-top: 70px;
		margin-bottom: 0px;
		
		/*height: 100vh;*//* 添加全屏 */
		/*width: 100vw;*/ /* 添加全屏*/
		box-sizing: border-box;
		overflow-x: hidden;

		
		

	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	/* 屏幕宽度大于786px时隐藏uni-page-head */
    @media (min-width: 786px) {
        uni-page-head {
            display: none !important;
            opacity: 0 !important;
            height: 0 !important;
            visibility: hidden !important;
        }
    }
	/*.d-daohang{
		
		width: 600rpx;
	}*/
	/* 添加在style部分 */
	.d-daohang-zuo {
    position: fixed;
    left: 0;
    
    width: 180rpx;
    height: calc(100vh - 70rpx);
    background: #f5f5f5;
    z-index: 100;
	box-shadow: 2px 0 5px rgba(177, 177, 177, 0.1);
  }
  
  .d-daohang-you {
    position: fixed;
    left: 180rpx;
    
    width: 180rpx;
    height: calc(100vh - 70rpx);
    background: #fff;
    z-index: 100;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }
   
   
   
   
   
   
   
   
   
 
   
  .d-erji-item {
    height: 60rpx;
    line-height: 60rpx;
    padding: 0 20rpx;
   /* border-bottom: 1px solid #f0f0f0;*/
  }
  
  .d-erji-item:active {
    background: #f5f5f5;
  }
  .you-guding {
	position: fixed;
	top: 0; /* 根据头部高度调整 */
	/*box-shadow: -2px 0 5px rgba(0,0,0,0.1);*/
	transition: all 0.3s ease;
}
/* 大于786px时的样式 */
@media screen and (min-width: 1024px) {
	.d-bianhua-10 {
		padding: 30px;
	}
	.pc-zuo-520 {
		margin-left: 520rpx;
	}
	.you-guding {
		position: fixed;
			
		top: 60px; /* 根据头部高度调整 */
		/*box-shadow: -2px 0 5px rgba(0,0,0,0.1);*/
		transition: all 0.3s ease;
	}
		
	
}
	
.d-video-height {
    max-height: 250px;
}
</style>
